package com.aidysoft.practice.thymeleaf;

import com.aidysoft.practice.mybaties.mapper.User4Mapper;
import com.aidysoft.practice.propertiesToSetValue.Users;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * 〈〉
 */
@Controller
@RequestMapping("/api")
public class ThymeleafController {

    @GetMapping("/testThymeleaf")
    public  String toIndex(Model model){

        Users users = Users.builder().age(1)
                .name("aaa")
                .build();
        model.addAttribute("users",users);
        return  "index";
    }
}
